//
//  MyOrderTableViewCell.m
//  Learn
//
//  Created by zyl on 2024/4/3.
//  Copyright © 2024 迟建国. All rights reserved.
//

#import "MyOrderTableViewCell.h"

@implementation MyOrderTableViewCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    [self.contentView addSubview:self.backView];
    [self.backView addSubview:self.titleLabel];
    [self.backView addSubview:self.tagLabel];
    [self.backView addSubview:self.subTitleLabel];
    [self.backView addSubview:self.arrowImg];
    [self.backView addSubview:self.coverImg];
    self.contentView.backgroundColor = lClearColor;
    self.backgroundColor = lClearColor;
    return self;
}
- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
    
   
}

- (UILabel *)titleLabel
{
    if (!_titleLabel) {
        
        _titleLabel = [[UILabel alloc] init];
        _titleLabel.frame = CGRectMake(85,10, 95,22);
        _titleLabel.font = MFontWithSize(16);
        _titleLabel.textColor = rgba(51, 51, 51, 1);
        _titleLabel.textAlignment = NSTextAlignmentLeft;
        _titleLabel.text = @"惠州初中英语";
    
    }
    return _titleLabel;
}
- (UILabel *)subTitleLabel
{
    if (!_subTitleLabel) {
        
        _subTitleLabel = [[UILabel alloc] init];
        _subTitleLabel.frame = CGRectMake(85,10 + 22 + 10,lScreenWidth - 20 - 95,22);
        _subTitleLabel.font = RFontWithSize(14);
        _subTitleLabel.textColor = rgba(142, 142, 142, 1);
        _subTitleLabel.textAlignment = NSTextAlignmentLeft;
        _subTitleLabel.text = @"VIP 2026-11-22到期";
    
    }
    return _subTitleLabel;
}
- (UILabel *)tagLabel
{
    if (!_tagLabel) {
        
        _tagLabel = [[UILabel alloc] init];
        _tagLabel.frame = CGRectMake(85 + 96 + 5,10,60,22);
        _tagLabel.font = MFontWithSize(14);
        _tagLabel.textColor = rgba(12, 183, 108, 1);
        _tagLabel.textAlignment = NSTextAlignmentCenter;
        _tagLabel.backgroundColor = rgba(227, 246, 237, 1);
        [_tagLabel setAllCornersWithCornerRadius:6];
        _tagLabel.text = @"已购买";
    
    }
    return _tagLabel;
}
- (UIImageView *)coverImg
{
    if (!_coverImg) {
        _coverImg = [[UIImageView alloc] initWithFrame:CGRectMake(5, 5, 70, 84)];
        _coverImg.backgroundColor = lRedColor;
        [_coverImg setAllCornersWithCornerRadius:15];
    }
    return _coverImg;
}
- (UIImageView *)arrowImg
{
    if (!_arrowImg) {
        _arrowImg = [[UIImageView alloc] initWithFrame:CGRectMake(lScreenWidth - 20 - 18, 15, 8, 14)];
        _arrowImg.image = IMAGENAMED(@"ic_mine_arrow_black");
    }
    return _arrowImg;
}
- (UIView *)backView
{
    if (!_backView) {
        _backView = [[UIView alloc] initWithFrame:CGRectMake( 0, 10, lScreenWidth - 20, 94)];
        _backView.backgroundColor = lWhiteColor;
        [_backView setAllCornersWithCornerRadius:15];
    }
    return _backView;
}
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
